/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.tb_parts.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.tb_car_class.entity.TbCarClass;
import com.thinkgem.jeesite.modules.tb_supplier.entity.TbSupplier;

/**
 * 汽车配件管理Entity
 * @author LiJie
 * @version 2017-06-10
 */
public class TbParts extends DataEntity<TbParts> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 配件名称
	private String partsPosition;		// 配件使用标的
	private String partsType;		// 配件类型
	private String supplierBy;		// 供货商
	private User y;					//更新者
	private User s;					//创建者
	private TbCarClass c;			//配件匹配车辆型号
	private TbSupplier u;			//供货商名称
	public TbSupplier getU() {
		return u;
	}

	public void setU(TbSupplier u) {
		this.u = u;
	}

	public TbParts() {
		super();
	}

	public User getY() {
		return y;
	}

	public void setY(User y) {
		this.y = y;
	}

	public User getS() {
		return s;
	}

	public void setS(User s) {
		this.s = s;
	}

	public TbCarClass getC() {
		return c;
	}

	public void setC(TbCarClass c) {
		this.c = c;
	}

	public TbParts(String id){
		super(id);
	}

	@Length(min=1, max=50, message="配件名称长度必须介于 1 和 50 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=50, message="配件使用标的长度必须介于 1 和 50 之间")
	public String getPartsPosition() {
		return partsPosition;
	}

	public void setPartsPosition(String partsPosition) {
		this.partsPosition = partsPosition;
	}
	
	@Length(min=1, max=50, message="配件类型长度必须介于 1 和 50 之间")
	public String getPartsType() {
		return partsType;
	}

	public void setPartsType(String partsType) {
		this.partsType = partsType;
	}
	
	@Length(min=1, max=50, message="创建人长度必须介于 1 和 50 之间")
	public String getSupplierBy() {
		return supplierBy;
	}

	public void setSupplierBy(String supplierBy) {
		this.supplierBy = supplierBy;
	}
	
}
